package com.kkb.kkbportal.controller;


import com.kkb.kkbcommon.api.CommonResult;
import com.kkb.kkbportal.domain.Partner;
import com.kkb.kkbportal.service.PartnerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ${黄柯}
 * @title: Recommend
 * @projectName kkb-parent-v2
 * @description 后台对合作伙伴的操作
 * @since 2021-08-14
 */
@Api(tags = "首页合作伙伴管理")
@RestController
@RequestMapping("/home/partner")
public class PartnerController {

    @Autowired
    private PartnerService partnerService;


    /**
     * 后台列表显示合作伙伴的信息
     *
     * @return 返回要显示的合作伙伴数据信息
     */
    @ApiOperation("合作伙伴品牌数据信息的获取")
    @GetMapping("/list")
    public CommonResult<List<Partner>> findPartnerList() {
        List<Partner> result = partnerService.listAll();
        return CommonResult.success(result, "获取合作品牌方数据成功");
    }


}

